// create new class and call super class constructor
Ext.ResizableConstrained = function(el, config){
    Ext.ResizableConstrained.superclass.constructor.call(this, el, config);
};
 
// extend base class
Ext.extend(Ext.ResizableConstrained, Ext.Resizable, {
    setXConstraint : function(left, right){
        // get father class parameter dd
        this.dd.setXConstraint(left, right);
    },
 
   setYConstraint : function(up, down){
     // get father class parameter dd
     this.dd.setYConstraint(up, down);
   }
});
 
// create new class
var myResizable = new Ext.ResizableConstrained('resize-el', {
   width: 200,
   height: 75,
   minWidth:100,
   minHeight:50, 
   maxHeight:150, 
   draggable:true
});
 
//call new method
myResizable.setYConstraint(0,300);
myResizable.setXConstraint(0,300);
